.dialog-overlay {
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  position: fixed;
  pointer-events: auto;
  color: var(--panel-overlay-text-color);
  z-index: 20;
  display: flex;

  &__no-pointer-events {
    pointer-events: none;
  }
}


.dialog {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;

  &__align-end {
    align-items: end;
    bottom: 0;
    position: absolute;
  }

  &__dark-background {
    background-color: var(--panel-overlay-background-color);
  }

  &__box {
    max-width: 30em;
    max-height: 100%;
    display: flex;
    position: relative;
    pointer-events: auto;
    width: 100%;

    &__contents {
      width: 100%;
      overflow-y: auto;
      padding: 30px;
      box-shadow: 0px 0px 30px 1px #202020;
      border-radius: 12px;
      display: flex;
      flex-direction: column;
      text-align: center;
      position: relative;
      background-color: var(--full-panel-background-color);

      &__title {
        @extend %top-title;
        margin-bottom: 20px;
      }

      &__body {
        font-size: 0.9em;
        font-weight: bold;
        color: var(--panel-text-color);
        display: flex;
        flex-direction: column;
        height: 100%;
        margin: 10px 0;
        white-space: pre-wrap;

        @media (max-width: 801px) {
          margin: 0;
        }

        a { color: var(--panel-text-color) }
        a.info-dialog--action-button { color: $action-text-color; }
      }

      &__links {
        display: flex;
        justify-content: center;
        margin: 16px 0;
        a {
          margin: 0 12px;
          color: var(--panel-text-color);
        }
      }

      &__close {
        @extend %panel-widget;
        position: absolute;
        left: 18px;
        top: 18px;
        font-size: 1.6em;
        font-weight: bold;
      }
    }

    &__contents-overflow {
      overflow-y: visible;
    }
  }

  &__wide {
    @media(min-width: 640px){
      max-width: 640px;
    }
    @media(max-width: 639px){
      max-width: 100%;
    }
  }
}

.dialog__box__contents__body p:first-child {
  margin-top: 0;
}

.invite-form, .add-media-form, .custom-scene-form {
  @extend %centered-flex-column;

  &__buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  &__link {
    display: flex;
    flex-direction: row;
  }

  &__link_field {
    @extend %input-field;
  }

  &__action-button {
    @extend %bottom-action-button;
    margin-left: 6px;
    margin-right: 6px;
    appearance: none;
    width: 128px;
    text-align: center;
    -moz-appearance: none;
    -webkit-appearance: none;
  }
}

.mailing-list-form {
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  margin: 0;

  &__first {
    width: 100%;
  }

  &__email_field {
    @extend %input-field;
  }

  &__submit {
    @extend %bottom-button;
    margin-top: 0;
    margin-bottom: 0;
  }

  &__privacy {
    margin-top: 10px;
    font-size: 0.7em;
  }

  &__privacy_checkbox {
    @extend %checkbox;
    vertical-align: middle;
    margin-bottom: 18px;
  }

  &__privacy_checkbox:checked {
    @extend %checkbox-checked;
    vertical-align: middle;
  }
}


.info-dialog {
  &__help {
    text-align: left;

    &__hud {
      width: 316px;
      max-width: 100%;
      margin: 12px 0;
    }
  }
}


.info-dialog--action-button {
  @extend %bottom-button;
  margin-left: 6px;
  margin-right: 6px;
  appearance: none;
  width: 168px;
  text-align: center;
  -moz-appearance: none;
  -webkit-appearance: none;
  margin: auto;
  text-decoration: none;
}
